const app = getApp()
Component({
  data: {
    count: 10,
    height: 0,
    tabbarHeight: app.globalData.tabbarHeight
  },
  methods:{
    addCount(){
      console.log('加载更多....')
      this.setData({
        "count" : this.data.count + 10
      })
    }
  },
  lifetimes: {
    attached(){
      wx.getSystemInfo({
        success:(res)=>{
          console.log('res',res)
          this.setData({
            "height" : res.safeArea.height
          })
        }
      })
    }
  },
  pageLifetimes: {
    show() {
      if (typeof this.getTabBar === 'function' &&
        this.getTabBar()) {
        this.getTabBar().setData({
          selected: 0
        })
      }
    }
  }
})
